<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>forsikrings beregner</title>
</head>

<body>
<?php	
	if (isset( $_REQUEST["alder"])) {
		$alder=$_REQUEST["alder"];
		$koen=$_REQUEST["koen"];
		$civilstand=$_REQUEST["civilstand"];
		$pris=500;
		
		if ($alder < "25" && $koen=="mand" && $civilstand=="ugift") {
			$pris=$pris + 1500;
		}
		if ($koen=="kvinde" && $civilstand=="gift") {
			$pris=$pris - 200;
		}
		if($alder>="46" && $alder<="64") {
			$pris=$pris - 100;
		}
		echo"prisen er: kr. $pris";
	}

?>
	<form action="forsikringsberegner.php">
		alder: <input type="text" name="alder" />
    	køn: <input type="text" name="koen" />
    	civilstand: <input type="text" name="civilstand" />
    	<br /><input type="submit" />
	</form>
    
    
    
    
    
    
    </body>
</html>